//
//  PS_HotContentTableViewCell.m
//  FinanceSupermarket
//
//  Created by 丹丹 on 2018/12/14.
//  Copyright © 2018年 xuezi. All rights reserved.
//

#import "PS_HotContentTableViewCell.h"

@implementation PS_HotContentTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)setDataForCell:(PS_ReMenHuiDaModel*)model{
    
    _titleLabel.text = model.title;
    
    //        NSString * urlStr=@"http://60.205.204.169:10001/tmp/uploads/20181214/76344b53dd5b6eda2a9a0acdb7bc32f8.jpg";
//    NSArray * imageArr = model.images;
//    if (imageArr.count>0) {
////
//        NSString * urlStr = [model.images firstObject];
//        NSString *unicodeStr = [NSString stringWithCString:[urlStr UTF8String] encoding:NSUnicodeStringEncoding];
    NSString * urlStr = @"http://pjnvzrhiu.bkt.clouddn.com/539df852ccfdbf2872bee6e33ebaef9b.png";
        NSURL * url = [NSURL URLWithString:urlStr];
        [_articleIamge sd_setImageWithURL:url];
//    }
    
    [_messageBtn setTitle:[NSString stringWithFormat:@" %@",model.comment_quantity] forState:UIControlStateNormal];
    if (model.is_zan == 1) {
        
        [_zanBtn setImage:[UIImage imageNamed:@"dianzan"] forState:UIControlStateNormal];
    }else{
        [_zanBtn setImage:[UIImage imageNamed:@"yidianzan"] forState:UIControlStateNormal];
    }
    [_zanBtn setTitle:[NSString stringWithFormat:@" %ld",(long)model.praise_points] forState:UIControlStateNormal];
    _stateLabel.text = model.create_time;
    
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
